<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p id="p">短路</p>
    <div class="didd">wwewq</div>
    <!-- <input type="text" name="" id="tt"> -->
    <!-- <input type="text" name="" id="dd"> -->
    <script>
        // onkeyup=function(){
            
        //     console.log(tt.value)
        //     console.log(dd.value)
        //     console.log(dd.value == tt.value)
        // }
        // tt.value=''
        // dd.value=' '
        // console.log('  ')
        // console.log(tt.value)
        // console.log(null==tt.value)
        // console.log(null==' ')

        var didd = document.querySelector('.didd')
        var div = document.createElement('div')
        div.innerText = '我是你爸爸'
        document.body.appendChild(div)
        document.body.insertBefore(div,p)
        document.body.appendChild(div)
        document.body.insertBefore(p,div)
        div.style['background'] = 'red' 
        div.style.background = 'red'
        // div.className = 'div'
        // console.log(p)   
        // insertBEfore()
        // p.remove()
        // document.body.removeChild(p)
        // console.log(p)
        // p.outerHTML = '<span>qweqweqweaaa<span>'
        // console.log(p)
        console.log(div.getAttribute('style'))
        // getComputedStyle(div).background
        // div.currentStyle.background
    </script>
</body>
</html>